package com.yonyou.hxjy.entity;

import java.io.Serializable;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * 
 * @TableName processinstance
 */
public class ProcessInstance implements Serializable {
    /**
     * 
     */
    private Integer id;  //主键

    /**
     * 
     */
    private String processInstanceId; //审批实例id

    private String createTime;

    private Date createDate;  //单据创建时间

    private Date updateDate;

    private String businessType; // 单据类型

    private String businessId;

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }


    public String getCreate() {
        return createTime;
    }

    public void setCreate(String createTime) {
        this.createTime = createTime;
    }


    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * 0表示未保存，1表示已保存
     */
    private Integer isSave = 0; //默认为未保存的状态

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    /**
     * 0表示未保存，1表示已保存
     */
    public Integer getIsSave() {
        return isSave;
    }

    /**
     * 0表示未保存，1表示已保存
     */
    public void setIsSave(Integer isSave) {
        this.isSave = isSave;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProcessInstance other = (ProcessInstance) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProcessInstanceId() == null ? other.getProcessInstanceId() == null : this.getProcessInstanceId().equals(other.getProcessInstanceId()))
            && (this.getIsSave() == null ? other.getIsSave() == null : this.getIsSave().equals(other.getIsSave()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProcessInstanceId() == null) ? 0 : getProcessInstanceId().hashCode());
        result = prime * result + ((getIsSave() == null) ? 0 : getIsSave().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append(", id=").append(id);
        sb.append(", processinstanceId=").append(processInstanceId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", type=").append(businessType);
        sb.append(", isSave=").append(isSave);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}